package com.example.pc.http;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.pc.updata.Baes.ChengJi;
import com.example.pc.updata.DaTi.TM;
import com.example.pc.updata.MyApplication;
import com.example.pc.updata.R;


/**
 * Created by 他的猫 on 2016/12/3.
 * 我的went适配器
 */

public class CJ_Adapter extends Base_Z_Adapter {
    CJ_Adapter.Holder holder;


    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        // 查找控件
        if (null == convertView) {
            convertView = LayoutInflater.from(MyApplication.getInstance())
                    .inflate(R.layout.item_chengji, null);
            holder = new CJ_Adapter.Holder();
            holder.kemu = (TextView) convertView
                    .findViewById(R.id.kemu);
            holder.chengji = (TextView) convertView
                    .findViewById(R.id.chengji);


            // 缓存Holder
            convertView.setTag(holder);
        } else {
            holder = (CJ_Adapter.Holder) convertView.getTag();
        }
        TM.DataBean teacher = (TM.DataBean) mDataList.get(position);

        holder.kemu.setText("姓名:" + teacher.getName());
        holder.chengji.setText("成绩：" + teacher.getChengji());

        return convertView;
    }

    public class Holder {
        TextView kemu;
        TextView chengji;
        TextView shijian;
        TextView word;

        LinearLayout me_fragment_Fans;
    }


}
